package com.scs.application.modules.msg.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.scs.application.core.mapper.IBaseMapper;
import com.scs.application.modules.msg.entity.InnerInbox;
import com.scs.application.modules.msg.vo.InnerInboxVO;
import org.apache.ibatis.annotations.Param;


public interface InnerInboxMapper extends IBaseMapper<InnerInbox> {

    /**
     * 查询当前用户
     * @param page
     * @param wrapper
     * @return
     */
    IPage<InnerInboxVO> page(IPage page, @Param(Constants.WRAPPER) Wrapper wrapper);

    InnerInboxVO findInnerInboxById(@Param("id")String id);

    Integer countNews(@Param("receiverUserCode")String receiverUserCode);

    InnerInboxVO msgUserTop1(@Param("receiverUserCode")String receiverUserCode);

    InnerInboxVO getMsgByNoticeId(@Param("noticeId") String noticeId, @Param("userCode") String userCode);

    void autoRead(@Param("autoReadTime") Integer autoReadTime);
}
